fix: session error fixed related to thumbnails.#12760
fix: session error fixed related to thumbnails.#12760dpgaspar merged 3 commits intoapache:masterfrom iercan:iercan-patch-1
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12760 +/- ##
==========================================
- Coverage 66.88% 66.78% -0.11%
==========================================
Files 1021 1022 +1
Lines 50015 50051 +36
Branches 4907 4915 +8
==========================================
- Hits 33455 33429 -26
- Misses 16435 16498 +63
+ Partials 125 124 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
superset/tasks/thumbnails.py
Outdated
| user = security_manager.get_user_by_username( | ||
| current_app.config["THUMBNAIL_SELENIUM_USER"], session=session | ||
| ) | ||
| user = session.merge(user) |
There was a problem hiding this comment.
possible that the user is not bound to a session since it's outside of the nullpool session block and at the end of the block the session is closed, can you revert and test placing screenshot.compute_and_cache under the session_scope?
There was a problem hiding this comment.
Yeah it worked as well. I changed code accordingly.
There was a problem hiding this comment.
Awesome!! thank you for the fix
dpgaspar
left a comment
There was a problem hiding this comment.
Looks good, just lint issues that need to be solved: superset/tasks/thumbnails.py:77:0: C0303: Trailing whitespace (trailing-whitespace)
@dpgaspar Fixed |
* fix: session error fixed related to thumbnails. * compute_and_cache moved to session scope * lint fix done
SUMMARY
Thumbnails stopped working on 1.0.0 because of unbound session of sqlaclhemy. See #12726
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
ADDITIONAL INFORMATION